The present disclosure relates generally to optical flow algorithms. Optical flow algorithms aim to measure a motion field from the apparent motion of a brightness pattern. Optical flow is widely used in 3D vision tasks such as egomotion estimation, Structure from Motion (SfM), motion segmentation, etc. One common limitation of optical flow is the computational power requirement. The calculation time of existing optical flow algorithms is typically on the order of seconds or even longer per frame. This long processing time thus prevents optical flow algorithms from many real-time applications such as autonomous navigation for unmanned vehicles.